package com.company;

public class SalaryInfo {

    private Staff _staff;

    public void set_staff(Staff _staff) {
        this._staff = _staff;
    }

    SalaryInfo(String type){
        switch (type) {
            case "普通员工":
                set_staff(new GeneralStaff());
                break;
            case "管理层":
                set_staff(new Management());
                break;
        }
    }

    public double getTotalSalary(){
        return _staff.getSalary()+_staff.getFestivalSalary();
    }
}

interface Staff{
    double getSalary();
    double getFestivalSalary();
}

class GeneralStaff implements Staff{
    public double getSalary(){
        //计算并返回普通员工的平日工资
        return 0;
    }
    public double getFestivalSalary(){
        //计算并返回普通员工的节假日工资
        return 0;
    }
}

class  Management implements Staff{
    public double getSalary(){
        //计算并返回管理层的平日工资
        return 0;

    }
    public double getFestivalSalary(){
        //计算并返回管理层的节假日工资
        return 0;

    }
}